Skip to main content

Open Secondary Market Token

Controls whether a token is open to the secondary market, allowing or restricting secondary market trading. This call is asynchronous — the handler enqueues an OpenToSecondaryMarket transaction and returns HTTP 200 immediately. The secondary-market permission only flips on-chain once the wallet pipeline confirms the transaction.

Tracked in a separate collection

Unlike the other state-transition endpoints, this one writes its transaction record to secondary_market_transactions (not token_transactions). The type constant (OpenToSecondaryMarket = 11) is shared between collections — the data lives elsewhere. Use the secondary-market transaction endpoints in your tooling to observe completion. The same applies to OpenToOtc / AcceptOtcOffer / CancelOtcOffer flows, which use otc_transactions.

Request

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

Parameters

NameTypeInDescription
token_idstringpathRequired. The ID of the token to update

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be application/json

Request Body

NameTypeDescription
is_openbooleanRequired. Set to true to open the token to secondary market, false to restrict secondary market trading

Example

curl --request POST \
--url '\{\{baseUrl\}\}/v2/admin/tokens/67d8774e903bfcbe7eb5d93e/open-to-secondary-market' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/10.3.1' \
--data '{
"is_open": true
}'

Response

{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}

Response Fields

FieldTypeDescription
transaction_idstringThe token transaction started by this call. Poll it with Get Transaction By ID; the flag flips only when it reports status: 3 (Done)

This call used to answer 200 with an empty object, which gave the caller nothing to follow the settlement with.

Status Codes

Status CodeDescription
200Success - the change has been started
400Bad Request - invalid request parameters or unknown token
401Unauthorized - invalid or missing authentication token
409Conflict - is_open_to_secondary_market already holds the requested value (code 10027), or a change to it is already in flight (code 10028)
500Internal Server Error

Notes

  • A 200 means the transaction was started, not that secondary market is open. is_open_to_secondary_market flips when the transaction settles.
  • The two 409s are deliberately distinct. 10027 says the flag already reads what you asked for and nothing more will happen; 10028 says the change you asked for is happening and you should wait for it. The flag alone cannot tell them apart, because it only moves once the change settles.