Skip to main content

Open Token to Secondary Market

Opens a token to the secondary market (holders listing their tokens for other investors) or closes it. The call is asynchronous: it queues an OpenToSecondaryMarket transaction (type 11) in the token's own transactions and answers with its id. is_open_to_secondary_market on the token changes only when the transaction reaches 3 (Done); poll it with Get Token Transaction By ID.

A request for the value the token already has is refused (10027), and so is a request while an earlier change of this flag is still running (10028). The flag cannot tell the two apart on its own, because it only moves once a change settles.

Required permission: token:open-secondary-market

Request​

POST /v2/admin/tokens/{token_id}/open-to-secondary-market

Parameters​

NameTypeInDescription
token_idstringpathRequired. Token id.

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
is_openbooleanNotrue opens the token to the secondary market, false closes it. Omitted, it reads as false.

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/tokens/67d8774e903bfcbe7eb5d93e/open-to-secondary-market' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{ "is_open": true }'

Response​

{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}

Response Fields​

FieldTypeDescription
transaction_idstringThe OpenToSecondaryMarket transaction. Poll it with Get Token Transaction By ID.

Errors​

StatusCodeDescription
40010015The body cannot be read (for example is_open is not a boolean)
40010016token_id is not a valid id
40010001Token not found (token domain 5)
40310005The caller's node does not cover the token's node (node domain 2)
40910027is_open_to_secondary_market already holds the requested value; nothing will happen (token domain 5)
40910028A change to this flag is already in progress; wait for its transaction to settle (token domain 5)

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.