Transfer currency tokens

Transfers currency tokens from one wallet to another.


Call URL

/currencies/(currencyAddress)/transfers

Type : POST


Call request header parameters

Field Type Required/Optional Description Accepted values
wallet-address string Required The sender's wallet address. Any valid wallet address
wallet-key string Required The key of the sender's wallet. Any valid wallet key that unlocks the sender's wallet

Call request URL parameters

Field Type Required/Optional Description Accepted values
currencyAddress string Required The address of the involved currency. Any valid currency address

Call request body parameters

Field Type Required/Optional Description Accepted values
destinationWalletAddress string Required The address of the destination wallet where the currency tokens will be send to. Any valid wallet address which is also a currency member of the involved currency
amountToTransfer number (in string) Required The amount of currency tokens to transfer Any number in a string format and is bigger than "0".

Sample Call Request

https://api.tetrium.io/tokenize/currencies/0x29341b674091d600c227B137a457b0573515A7A8/transfers

Parameters:

{
   "destinationWalletAddress":"0x34d86f8b9ece5ad06ef757d1c21c4373026d3345",
   "amountToTransfer":"10"
}

Call responses

Success response

Field Type Description Respond Values
status string Status of the API call. "success"
message string Information about the status. "transfer-currency-token initiated"
transactionHash string The hash of the transaction. To be used to verify the transaction's sealing status. Any string

Error response

Field Type Description Respond Values
status string Status of the API call. "fail"
error string Information about the error. (See below)

Information contained in error:

Error Messages Description
"missing destinationWalletAddress" destinationWalletAddress was not provided as a parameter in the API call body.
"invalid destinationWalletAddress" destinationWalletAddress provided was not in the correct format.
"destinationWalletAddress not a currency member" destinationWalletAddress to receive the currency tokens is not a currency member.
"user cannot transfer to self" destinationWalletAddress cannot be the same as wallet-address.
"missing amountToTransfer" amountToTransfer was not provided as a parameter in the API call body.
"invalid amountToTransfer" amountToTransfer provided was not in the correct format.

For any other errors, please refer to List of Common Error Messages

Sample Call Response

{
   "status":"success",
   "message":"transfer-currency-token initiated",
   "transactionHash":"0xf03985ea22f80b4229771cf4d1492645b5b092d795d79581fc8aea83a5654cb1"
}

results matching ""

    No results matching ""