Alias Operations
Buy / Sell Alias
Buy or sell an alias. POST only.
Request: Refer to Create Transaction Request for common parameters.
requestTypeis eitherbuyAliasorsellAliasaliasis the ID of the alias (optional)aliasNameis the alias name (optional ifaliasprovided)priceNQTis the asking price (in NQT) of the alias (sellAliasonly)amountNQTis the amount (in NQT) offered for an alias for sale (buyAliasonly)recipientis the account ID of the recipient (only required forsellAliasand only if there is a designated recipient)recipientPublicKeyis the public key of the recipient account (only applicable ifrecipientprovided; 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.
requestTypeissetAliasaliasNameis the alias namealiasURIis 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.
requestTypeisdeleteAliasaliasis the alias ID (optional)aliasNameis the alias name to be deleted (optional ifaliasprovided)
Response: Refer to Create Transaction Response.
Example: Refer to Delete Alias example.
Get Alias
Get information about a given alias
Request:
requestTypeisgetAliasaliasis the alias ID (optional)aliasNameis the name of the alias (optional ifaliasprovided)requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis 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:
requestTypeisgetAliasCountaccountis the account IDrequireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis 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 ifrequireBlockis 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:
requestTypeisgetAliasesaccountis the ID of the account that owns the aliasestimestampis the earliest creation time (in seconds since the genesis block) of the aliases (optional)firstIndexis a zero-based index to the first alias to retrieve (optional)lastIndexis a zero-based index to the last alias to retrieve (optional)requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis 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 ifrequireBlockis 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:
requestTypeisgetAliasesLikealiasPrefixis the prefix (at least 2 characters long) of the aliasNamefirstIndexis a zero-based index to the first alias to retrieve (optional)lastIndexis a zero-based index to the last alias to retrieve (optional)requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis 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 ifrequireBlockis provided but notrequireLastBlock)requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Aliases Like example.