List Token
Offers a token for primary sale. The call is asynchronous: it queues a TokenListing transaction (type 2) and answers with its id. The listing puts the token's current value.listed_supply, token price and purchase bounds on chain, so set them first with Update Token Metric. Poll Get Token Transaction By ID: when it reaches 3 (Done) the token is in status 6 (Listed).
Each of the token's active documents is also anchored on chain by its own AddDocumentToToken transaction (type 16). Those ids are not returned; find them with List Token Transactions.
Required permission: token:sell-asset
Request
POST /v2/admin/tokens/{token_id}/listing
Parameters
| Name | Type | In | Description |
|---|---|---|---|
token_id | string | path | Required. Token id. |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Example
curl --request POST \
--url '{{baseUrl}}/v2/admin/tokens/67d8774e903bfcbe7eb5d93e/listing' \
--header 'Authorization: Bearer <access_token>'
Response
{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}
Response Fields
| Field | Type | Description |
|---|---|---|
transaction_id | string | The TokenListing transaction. Poll it with Get Token Transaction By ID. |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10016 | token_id is not a valid id |
| 400 | 10001 | Token not found (token domain 5) |
| 403 | 10005 | The caller's node does not cover the token's node (node domain 2) |
A failure after acceptance ends the transaction in status 4 (Error) with the reason in its error field. See Errors for the error format and common codes.