Fungible Tokens (ERC-20 or compatible)

Fungible tokens are interchangeable and are used as a blockchain representation of the currency. Fungible tokens are described by the ERC-20 standard on the Ethereum blockchain or by the equivalent standard on the other blockchains.

Each API related to fungible tokens supports its own set of the blockchains. The list of the supported blockchains is provided in the operation description further in this section.

Deploy a fungible token smart contract

2 credits per API call

Deploy a fungible token smart contract on the blockchain. In a deployed smart contract, you can mint and burn fungible tokens. The whole supply of fungible tokens (the supply parameter in the request body) will be transferred to the specified blockchain address (the address parameter in the request body).
Smart contracts are standardized and audited.

This API is supported for the following blockchains:

  • Algorand
  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • KuCoin Community Chain
  • Polygon
  • Solana
  • XinFin

You can review the code of a deployed smart contract here.

Signing a transaction
When deploying a fungible token smart contract, 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
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to work with

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE"
symbol
required
string [ 1 .. 30 ] characters

Symbol of the ERC20 token

name
required
string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$

Name of the ERC20 token

totalCap
string <= 38 characters ^[+]?((\d+(\.\d*)?)|(\.\d+))$

Max supply of ERC20 token.

supply
required
string <= 38 characters ^[+]?((\d+(\.\d*)?)|(\.\d+))$

Initial supply of ERC20 token. If totalCap is not defined, this will be the total cap.

digits
required
number [ 1 .. 30 ]

Number of decimal points

address
required
string [ 42 .. 43 ] characters

Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.

fromPrivateKey
required
string = 66 characters

Private key of Ethereum account address, from which the fee for the deployment of ERC20 will be paid. Private key, or signature Id must be present.

nonce
number >= 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

object (CustomFee)

The custom defined fee; if not present, will be calculated automatically

gasPrice
required
string^[+]?\d+$

The price for one gas unit (in Gwei)

gasLimit
required
string^[+]?\d+$

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

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/blockchain/token/deploy
Request samples
application/json
{
  • "chain": "ETH",
  • "symbol": "ERC_SYMBOL",
  • "name": "MyERC20",
  • "supply": "10000000",
  • "digits": 18,
  • "address": "0xa0Ca9FF38Bad06eBe64f0fDfF279cAE35129F5C6",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Mint fungible tokens

2 credits per API call

Create new fungible tokens in the smart contract (the contractAddress parameter in the request body) and transfer them to the specified blockchain address (the to parameter in the request body). You can mint new fungible tokens only if the current supply of tokens in the smart contract is lower than the total supply set for this contract.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • KuCoin Community Chain
  • Polygon
  • XinFin

Signing a transaction
When minting fungible tokens, 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
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to work with

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE"
amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be minted and transferred to the recipient.

to
required
string [ 42 .. 43 ] characters

Blockchain address to send ERC-20 tokens to.

contractAddress
required
string [ 42 .. 43 ] characters

Address of ERC-20 token

fromPrivateKey
required
string = 66 characters

Private key of sender address. Private key, or signature Id must be present.

nonce
number >= 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/blockchain/token/mint
Request samples
application/json
{
  • "chain": "ETH",
  • "amount": "100000",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Burn fungible tokens

2 credits per API call

Burn fungible tokens. Burning fungible tokens deletes the specified supply of the tokens (the amount parameter in the request body) from the smart contract (the contractAddress parameter in the request body).

This API is supported for the following blockchains:

  • Algorand
  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • KuCoin Community Chain
  • Polygon
  • XinFin

Signing a transaction
When burning fungible tokens, 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
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to work with

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE"
amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount of tokens to be destroyed.

contractAddress
required
string [ 42 .. 43 ] characters

Address of ERC20 token

fromPrivateKey
required
string = 66 characters

Private key of sender address. Private key, or signature Id must be present.

object (CustomFee)

The custom defined fee; if not present, will be calculated automatically

gasPrice
required
string^[+]?\d+$

The price for one gas unit (in Gwei)

gasLimit
required
string^[+]?\d+$

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

nonce
number >= 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/blockchain/token/burn
Request samples
application/json
{
  • "chain": "ETH",
  • "amount": "100000",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Allow a blockchain address to transfer and burn fungible tokens

2 credits per API call

Allow a blockchain address (the spender parameter in the request body) to transfer and burn fungible tokens on behalf of the smart contract owner.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • Polygon

Signing a transaction
When allowing a blockchain address to transfer and burn fungible tokens, 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
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to work with

Enum: "ETH" "BSC" "MATIC" "KLAY" "ONE"
contractAddress
required
string [ 42 .. 43 ] characters

The address of the smart contract

spender
required
string [ 42 .. 43 ] characters

The blockchain address to be allowed to transfer or burn the fungible tokens

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

The amount of the tokens allowed to be transferred or burnt

fromPrivateKey
required
string = 66 characters

The private key of the smart contract's owner; the fee will be deducted from the owner's address

object (CustomFee)

The custom defined fee; if not present, will be calculated automatically

gasPrice
required
string^[+]?\d+$

The price for one gas unit (in Gwei)

gasLimit
required
string^[+]?\d+$

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

nonce
number >= 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/blockchain/token/approve
Request samples
application/json
{
  • "chain": "ETH",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Transfer fungible tokens

2 credits per API call

Transfer a supply of fungible tokens existing in the smart contract (the contractAddress parameter in the request body) to the specified blockchain address (the to parameter in the request body).
Transferring fungible tokens invokes the transfer() method.

This API is supported for the following blockchains:

  • Algorand
  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • KuCoin Community Chain
  • Polygon
  • Solana
  • XinFin

Transferring fungible tokens on Algorand
On Algorand, the recipient has to agree in advance to receive your fungible tokens because Algorand charges users for storing the tokens on their addresses, and an Algorand blockchain address by default does not receive the tokens unless explicitly agreed. Before transferring the fungible tokens, make sure that the recipient has agreed to receive the NFT to their address.

Blockchain-specific APIs to transfer fungible tokens
You can also use blockchain-specific APIs for transferring fungible tokens on the following blockchains:

Signing a transaction
When transferring fungible tokens, 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
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to work with

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE"
to
required
string [ 1 .. 50 ] characters

The blockchain address to send the fungible tokens to

contractAddress
required
string [ 42 .. 43 ] characters

The blockchain address of the fungible token smart contract

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

The amount of the fungible tokens to be sent

digits
required
number [ 1 .. 30 ]

The number of decimal places that the fungible tokens have; to find out how many decimal places are used in the fungible tokens, check out the smart contract

fromPrivateKey
required
string = 66 characters

The private key of the blockchain address from which the fee will be deducted

nonce
number >= 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

object (CustomFee)

The custom defined fee; if not present, will be calculated automatically

gasPrice
required
string^[+]?\d+$

The price for one gas unit (in Gwei)

gasLimit
required
string^[+]?\d+$

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

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/blockchain/token/transaction
Request samples
application/json
{
  • "chain": "ETH",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000",
  • "digits": 18,
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Get fungible token transactions on a blockchain address

1 credit per API call

Get incoming and outgoing transactions related to fungible tokens on a blockchain address.

This API is supported for the following blockchains:

  • Algorand
  • Celo
  • Ethereum
  • Polygon
SecurityX-API-Key
Request
path Parameters
chain
required
string

The blockchain to work with

Enum: "CELO" "ALGO" "MATIC" "ETH"
Example: CELO
address
required
string

Account address you want to get balance of

Example: 0x8ce4e40889a13971681391aad29e88efaf91f784
tokenAddress
required
string

Address of the token smart contract (or asset id in case of ALGO)

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

Max number of items per page is 50.

Example: pageSize=10
offset
number

Offset to obtain next page of the data.

Example: offset=0
from
number >= 0

Transactions from this block onwards will be included.

Example: from=1087623
to
number >= 0

Transactions up to this block will be included.

Example: to=1087823
sort
string
Default: "DESC"

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

Enum: "ASC" "DESC"
Example: sort=ASC
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.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/blockchain/token/transaction/{chain}/{address}/{tokenAddress}
Request samples
Response samples
application/json
[
  • {
    }
]

Get the number of fungible tokens that a blockchain address holds in a smart contract

1 credit per API call

Get the number of the fungible tokens minted on a specific smart contract (the contractAddress path parameter in the request endpoint URL) that a blockchain address holds.

This API is supported for the following blockchains:

  • Algorand
  • BNB Smart Chain
  • Celo
  • Elrond
  • Ethereum
  • Harmony
  • Klaytn
  • KuCoin Community Chain
  • Polygon
  • Solana
  • XinFin
SecurityX-API-Key
Request
path Parameters
chain
required
string

Network name

Enum: "CELO" "ALGO" "MATIC" "ETH" "BSC" "XDC" "KLAY" "ONE" "EGLD" "KCS" "SOL"
Example: CELO
address
required
string

The blockchain address that you want to get the token balance of

Example: 0x3223AEB8404C7525FcAA6C512f91e287AE9FfE7B
contractAddress
required
string

The address of the fungible token smart contract

Example: 0x94Ce79B9F001E25BBEbE7C01998A78F7B27D1326
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored.

Value: "ethereum-sepolia"
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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/blockchain/token/balance/{chain}/{contractAddress}/{address}
Request samples
Response samples
application/json
{
  • "balance": "10"
}

Get the total number of fungible tokens that a blockchain address holds

1 credit per API call

Get the number of all fungible tokens that a blockchain address holds across a blockchain. The tokens are returned grouped by the smart contracts they were minted on.

This API is supported for the following blockchains:

  • Algorand
  • Celo
  • Ethereum
  • Polygon
  • Solana
SecurityX-API-Key
Request
path Parameters
chain
required
string

Network name

Enum: "CELO" "ETH" "MATIC" "SOL" "ALGO"
Example: CELO
address
required
string

The blockchain address that you want to get the token balance of

Example: 0x3223AEB8404C7525FcAA6C512f91e287AE9FfE7B
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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/blockchain/token/address/{chain}/{address}
Request samples
Response samples
application/json
[
  • {
    }
]