Set currency decimals

Changes the current currency decimals.

Note: Please be cautious as executing this action will inflate/deflate your currency accordingly. For example reducing the current currency decimals by one decimal point will inflate all your currency token values by 10 times. The opposite applies to increasing the decimal points.


Call URL

/currencies/(currencyAddress)/decimals

Type : PUT


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
newCurrencyDecimals number (in string) Required The new symbol for the currency token. Any integer in string (limited to 6 decimal points)

Sample Call Request

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

Parameters:

{
   "newCurrencyDecimals":"4"
}

Call responses

Success response

Field Type Description Respond Values
status string Status of the API call. "success"
message string Information about the status. "set-currency-decimals 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 newCurrencyDecimals" newCurrencyDecimals was not provided as a parameter in the API call body.
"invalid newCurrencyDecimals" newCurrencyDecimals provided was not in the correct format.
"newCurrencyDecimals exceed maximum" newCurrencyDecimals provided exceeds the allowed limit of 6.

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

Sample Call Response

{
   "status":"success",
   "message":"set-currency-decimals initiated",
   "transactionHash":"0x15914a1fd721bb029d5c9e336e4342f7170212015ca1c75a702bb2cfbe94fc30"
}

results matching ""

    No results matching ""