Alias Operations
Buy / Sell Alias
Buy or sell an alias. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
is eitherbuyAlias
orsellAlias
alias
is the ID of the alias (optional)aliasName
is the alias name (optional ifalias
provided)priceNQT
is the asking price (in NQT) of the alias (sellAlias
only)amountNQT
is the amount (in NQT) offered for an alias for sale (buyAlias
only)recipient
is the account ID of the recipient (only required forsellAlias
and only if there is a designated recipient)recipientPublicKey
is the public key of the recipient account (only applicable ifrecipient
provided; optional, enhances security of a new account)
Note: An alias can be transferred rather than sold by setting `priceNQT to zero. A pending sale can be canceled by selling again to self for a price of zero.
Response: Refer to Create Transaction Response.
Example: Refer to Buy / Sell Alias example.
Set Alias
Create and/or assign an alias. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
issetAlias
aliasName
is the alias namealiasURI
is the alias URI (e.g. https://www.google.com/ (opens in a new tab))
Response: Refer to Create Transaction Response. The transaction ID is also the alias ID.
Example: Refer to Set Alias example.
Delete Alias
Delete an alias given an alias ID or name. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestType
isdeleteAlias
alias
is the alias ID (optional)aliasName
is the alias name to be deleted (optional ifalias
provided)
Response: Refer to Create Transaction Response.
Example: Refer to Delete Alias example.
Get Alias
Get information about a given alias
Request:
requestType
isgetAlias
alias
is the alias ID (optional)aliasName
is the name of the alias (optional ifalias
provided)requireBlock
is the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlock
is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
timestamp
(N) is the time (in seconds since the genesis block) when the alias was created or last transferredaliasName
(S) is the name of the aliasaccount
(S) is the number of the account that owns the aliasaccountRS
(S) is the Reed-Solomon address of the account that owns the aliasaliasURI
(S) is what the alias points to, in URI formatalias
(S) is the alias IDpriceNQT
(S) is the asking price (in NQT) of the alias if it is for salebuyer
(S) is the account number of the buyer if the alias is for sale and a buyer is specifiedlastBlock
(S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Alias example.
Get Alias Count
Get the number of aliases owned by an account given the account ID.
Request:
requestType
isgetAliasCount
account
is the account IDrequireBlock
is the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlock
is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
numberOfAliases
(N) is the number of aliases owned by the accountlastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Alias Count example.
Get Aliases
Get information on aliases owned by a given account in alias name order.
Request:
requestType
isgetAliases
account
is the ID of the account that owns the aliasestimestamp
is the earliest creation time (in seconds since the genesis block) of the aliases (optional)firstIndex
is a zero-based index to the first alias to retrieve (optional)lastIndex
is a zero-based index to the last alias to retrieve (optional)requireBlock
is the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlock
is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
aliases
(A) is an array of alias objects (refer to Get Alias for details)lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Aliases example.
Get Aliases Like
Get all aliases starting with a given prefix in alias name order.
Request:
requestType
isgetAliasesLike
aliasPrefix
is the prefix (at least 2 characters long) of the aliasNamefirstIndex
is a zero-based index to the first alias to retrieve (optional)lastIndex
is a zero-based index to the last alias to retrieve (optional)requireBlock
is the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlock
is the block ID of a block that must be last in the blockchain during execution (optional)
Response:
aliases
(A) is an array of alias objects (refer to Get Alias for details)lastBlock
(S) is the last block ID on the blockchain (applies ifrequireBlock
is provided but notrequireLastBlock
)requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Aliases Like example.