Fungible Tokens (ERC-20 or compatible)

An ERC-20 token is a standardized Smart Contract with a predefined set of features. It represents fungible tokens, which can be interchanged. The ERC-20 token is used as a blockchain representation of the currency.

Tatum now supports ERC20 these blockchains:

  • Ethereum
  • Polygon (Matic)
  • Kcs (KCS)
  • Binance Smart Chain
  • Celo
  • Harmony.ONE
  • XDC Network (XinFin)
  • Algorand
  • Klaytn

Deploy ERC20 Smart Contract.

Deploy ERC20 Smart Contract. This method creates new ERC20 (Fungible Tokens) Smart Contract on the blockchain. Smart contract is standardized and audited. It is possible to mint and burn tokens. It is possible to see the code of the deployed contract here. Whole predefined supply of the tokens will be transferred to the chosen address.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Chain to work with.

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE" "ALGO"
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

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

object

Custom defined fee. If not present, it will be calculated automatically.

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

Gas limit for transaction in gas price.

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

Gas price in Gwei.

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",
  • "totalCap": "10000000",
  • "supply": "10000000",
  • "digits": 18,
  • "address": "0xa0Ca9FF38Bad06eBe64f0fDfF279cAE35129F5C6",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 0,
  • "fee": {
    }
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Mint ERC20

2 credits per API call.


Create new ERC20 Fungible Tokens and transfer it to destination account. Tokens can be created only if current supply is lower then total supply. Create and transfer any ERC20 tokens from smart contract defined in contractAddress.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Chain to work with.

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

Amount to be minted and transfered 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

Nonce to be set to transaction. If not present, 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",
  • "nonce": 0
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Burn ERC20

2 credits per API call.


Burn ERC20 Fungible Tokens. This method destroys ERC20 tokens from smart contract defined in contractAddress.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Chain to work with.

Enum: "ETH" "BSC" "MATIC" "KLAY" "XDC" "ONE" "ALGO"
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

Custom defined fee. If not present, it will be calculated automatically.

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

Gas limit for transaction in gas price.

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

Gas price in Gwei.

nonce
number >= 0

Nonce to be set to Celo transaction. If not present, 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",
  • "fee": {
    },
  • "nonce": 0
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Approve spending of ERC20

2 credits per API call.


Approve ERC20 Fungible Tokens to be spendable by someone else. This method allows new address to transfer/burn ERC20 tokens on behalf of the owner.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Chain to work with.

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

Amount to be approved for the spender.

spender
required
string [ 42 .. 43 ] characters

Blockchain address of the new spender.

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.

object

Custom defined fee. If not present, it will be calculated automatically.

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

Gas limit for transaction in gas price.

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

Gas price in Gwei.

nonce
number >= 0

Nonce to be set to transaction. If not present, 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",
  • "amount": "100000",
  • "spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "fee": {
    },
  • "nonce": 0
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Transfer ERC20 Token

2 credits per API call.


Transfer ERC20 Fungible Tokens from account to account. Transfer any ERC20 tokens from smart contract defined in contractAddress. This method invokes ERC20 method transfer() to transfer tokens.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages. Algorand is unique a way that the receiving account should be ready before sending the FT(Erc20) asset. To perform this, the receiving account should transfer the FT(Erc20) asset with 0 amount to itself. During the process, it's using the same API as the main transaction: the only difference is that the "fromPrivateKey" should be the privateKey of the receiving account.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Chain to work with.

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

Blockchain address to send ERC20 token to

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

Amount to be sent.

contractAddress
required
string [ 42 .. 43 ] characters

Address of ERC20 token

digits
required
number [ 1 .. 30 ]

Number of decimal points that ERC20 token has.

fromPrivateKey
required
string = 66 characters

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

nonce
number >= 0

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

object

Custom defined fee. If not present, it will be calculated automatically.

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

Gas limit for transaction in gas price.

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

Gas price in Gwei.

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",
  • "amount": "100000",
  • "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "digits": 18,
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 0,
  • "fee": {
    }
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Get ERC20 transactions by address

1 credit per API call.


Get ERC20 transactions by address. This includes incoming and outgoing transactions for the address.

SecurityX-API-Key
Request
path Parameters
chain
required
string

Blockchain to work with

Value: "CELO"
Example: CELO
address
required
string

Account address you want to get balance of

Example: 0x8ce4e40889a13971681391aad29e88efaf91f784
tokenAddress
required
string

Address of the token smart contract

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 onwords 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
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/blockchain/token/transaction/{chain}/{address}/{tokenAddress}?pageSize=10&offset=0&from=1087623&to=1087823&sort=ASC' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Get ERC20 Account balance

1 credit per API call.


Get ERC20 Account balance. Returns number of tokens Account holds.

SecurityX-API-Key
Request
path Parameters
chain
required
string

Network name

Example: CELO
address
required
string

Account address you want to get balance of

Example: 0x3223AEB8404C7525FcAA6C512f91e287AE9FfE7B
contractAddress
required
string

ERC20 contract address

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

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

Enum: "ethereum-ropsten" "ethereum-rinkeby"
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
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/blockchain/token/balance/{chain}/{contractAddress}/{address}' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-testnet-type: ethereum-ropsten'
Response samples
application/json
{
  • "balance": "10"
}

Get ERC20/SPL/ASA tokens by address

1 credit per API call.


Get ERC20/BEP20/SPL account balance. Returns number of tokens that Account holds.

SecurityX-API-Key
Request
path Parameters
chain
required
string

Network name

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

Account address you want to get 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
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/blockchain/token/address/{chain}/{address}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]