Transfer an asset from a gas pump address

/v3/blockchain/sc/custodial/transfer

2 credits per API call

Transfer (send) an asset from a gas pump address to the other address.

This operation is usually performed by users in your custodial application: a user who has a gas pump address assigned wants to transfer an asset to some address on the blockchain.

The gas fee for sending the asset will be covered by crypto funds on the master address. Make sure that the master address always has enough funds to cover gas fees.

To be able to send the asset:

  • The gas pump address must be activated.
    To check whether the gas pump address is activated, use this API.
  • The gas pump address must be the owner of the asset.

With this API, you can send only one asset per API call. If you want to send multiple assets, use the API for transferring multiple assets from a gas pump account.

This API is supported for the following blockchains:

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

Signing a transaction
When transferring an asset, 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required

The blockchain to work with

Allowed:
string
required
length between 42 and 42

The gas pump address that transfers the asset; this is the address that you precalculated and activated earlier and that is assigned to a customer in your custodial application; this is not the "master address"

string
required
length between 42 and 42

The blockchain address that receives the asset

number
enum
required

The type of the asset to transfer. Set 0 for fungible tokens (ERC-20 or equivalent), 1 for NFTs (ERC-721 or equivalent), 2 for Multi Tokens (ERC-1155 or equivalent), or 3 for native blockchain currencies.

Allowed:
string
length between 42 and 42

(Only if the asset is a fungible token, NFT, or Multi Token) The address of the token to transfer. Do not use if the asset is a native blockchain currency.

string

(Only if the asset is a fungible token, Multi Token, or native blockchain currency) The amount of the asset to transfer. Do not use if the asset is an NFT.

string
length ≤ 256

(Only if the asset is a Multi Token or NFT) The ID of the token to transfer. Do not use if the asset is a fungible token or native blockchain currency.

string
required
length between 66 and 66

The private key of the blockchain address that owns the gas pump address ("master address")

number

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

fee
object

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

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json